Reapply "[APIE-1040] Add generic --wait framework; refactor Flink sta…#3389
Open
Steven Gagniere (sgagniere) wants to merge 1 commit into
Open
Reapply "[APIE-1040] Add generic --wait framework; refactor Flink sta…#3389Steven Gagniere (sgagniere) wants to merge 1 commit into
Steven Gagniere (sgagniere) wants to merge 1 commit into
Conversation
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
Kostya Linou (linouk23)
approved these changes
Jun 24, 2026
There was a problem hiding this comment.
Pull request overview
Adds a reusable polling/wait utility and wires Flink statement creation (cloud + on-prem) to use it, expanding integration coverage for --wait timeouts and failed phases.
Changes:
- Introduced
pkg/waitgeneric polling helpers (Poll,PollPhases) with unit tests. - Refactored Flink statement create commands to support
--wait+ new--wait-timeout, using phase-based polling instead ofpkg/retry. - Updated test-server handlers and integration golden fixtures to cover success, timeout, and failed-phase
--waitflows (cloud + on-prem).
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/test-server/flink_onprem_handler.go | Adds on-prem statement response to simulate a successful --wait polling transition. |
| test/test-server/flink_gateway_router.go | Makes statement GET responses vary by statement name to simulate PENDING/FAILED paths. |
| test/flink_test.go | Adds integration cases for --wait timeout and failed phase (cloud). |
| test/flink_onprem_test.go | Adds integration coverage for --wait success path (on-prem). |
| test/fixtures/output/flink/statement/create-wait-timeout.golden | New golden for timeout error + suggestion. |
| test/fixtures/output/flink/statement/create-wait-onprem.golden | New golden for on-prem --wait successful output. |
| test/fixtures/output/flink/statement/create-wait-failed.golden | New golden for failed-phase error + suggestion. |
| test/fixtures/output/flink/statement/create-missing-sql-failure.golden | Updates help output for --wait and adds --wait-timeout. |
| test/fixtures/output/flink/statement/create-missing-compute-pool-failure.golden | Updates help output for --wait and adds --wait-timeout. |
| test/fixtures/output/flink/statement/create-help.golden | Updates help output for --wait and adds --wait-timeout. |
| test/fixtures/output/flink/statement/create-help-onprem.golden | Updates help output for --wait and adds --wait-timeout. |
| pkg/wait/wait.go | New generic wait/poll implementation and phase helpers. |
| pkg/wait/wait_test.go | Unit tests for wait/poll behavior (ready, failed, timeout, fetch errors, delay, ctx cancel). |
| internal/flink/command_statement_create.go | Refactors cloud statement create to use pkg/wait and introduces --wait-timeout. |
| internal/flink/command_statement_create_onprem.go | Refactors on-prem statement create to use pkg/wait and introduces --wait-timeout. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| return false, nil | ||
| } | ||
|
|
||
| deadline := time.After(opts.Timeout) |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




…t… (#3386)
This reverts commit 7d98f0c.
Release Notes
Breaking Changes
New Features
Bug Fixes
Checklist
Whatsection below whether this PR applies to Confluent Cloud, Confluent Platform, or both.Test & Reviewsection below.Blast Radiussection below.What
Blast Radius
References
Test & Review